# coding:UTF-8

import config

import base_func
import topo_data

def build_stress_count_tunnel_in_topo(resource_location, count) :
    topo_data.set_resource_location(config.global_local_stress_test_topo)

    # 初始化网络拓扑信息
    topo_input_params = {}
    topo_input_params['resource-location'] = resource_location
    base_func.init_topology_data(topo_input_params)

    # 初始化网络隧道信息
    tunnel_input_params = {}
    tunnel_input_params['resource-location'] = resource_location + str(count * 2) + '/'
    base_func.init_tunnel_info_data(tunnel_input_params)
    base_func.init_tunnel_stat_data(tunnel_input_params)

def build_current_stress_tunnels(count) :
    resource_location = config.global_remote_current_test_topo

    build_stress_count_tunnel_in_topo(resource_location, count)

def build_stress_stress_tunnels(count) :
    resource_location = config.global_remote_stress_test_topo

    build_stress_count_tunnel_in_topo(resource_location, count)